package com.redxiii.tracplus.ejb.search;

import com.redxiii.tracplus.ejb.util.AppConfiguration;
import com.redxiii.tracplus.ejb.util.AppConfiguration.AppParam;

/**
 * @author Daniel Filgueiras
 * @since 01/04/2012
 */
public class SearchManagerFactory {

	public static SearchManager getManager() {
		boolean dummy = AppConfiguration.getInstance().getAsBoolean(AppParam.DUMMY_SEARCH_MANAGER, false);
		
		if (dummy) {
			return DummySearchManager.getInstance();
		} else {
			return LuceneSearchManager.getInstance();
		}
	}
}
